1. Field of the Invention
The present invention relates generally to configuring the user interface of a computer system and, more particularly, to configuring the user interface of a computer system based on a selected language and international location.
2. Related Art
Typical computer systems, such as personal computers and workstations, can output alpha-numeric data to users in any of a variety of formats. Computer systems may employ any of a number of different format parameters for generating this output. Some format parameters, such as font and size, are completely arbitrary and may be set according to a user's desire. Other format parameters, however, are dependent upon the user's language. For example, a computer system should display days of the week and months of the year in a language which the user can understand. Preferably, the computer system permits users to select a language from a menu list of languages.
Yet other formats, such as numerical formats and date formats, depend on the user's geographic location. In the United States, for example, conventional practice for numerical display is to use a comma to separate the hundreds column from the thousands column as in, for example, the number 5,325. In addition, a period is used as a decimal point to separate the ones column from the tenths column as in, for example, the number 5,325.75. In some other countries, however, the roles of the period and comma are reversed so that the number which is written in the United States as 5,325.75, is instead written as 5.325,75. Also in the United States, conventional practice for abbreviating dates is month/day/year. Thus, Jan. 8, 1997 is abbreviated as Jan. 8, 1997. In some other countries, however, the accepted format is day/month/year, so that Jan. 8, 1997 is written as Jan. 8, 1997. It is important, therefore, that a computer system be able to alter its output based upon a user's language and geographic region.
Typically, language specific and location specific formatting parameters are maintained in locales. A locale is a file or group of files which contain formatting parameters for a computer system. A typical locale may have fifty or more fields for specifying data strings. These data strings specify how to display or output language specific data such as, for example, months of the year, days of the week and some common terms such as "yes" and "no." These data strings also specify how to format numeric data such as, for example, monetary values, time and dates. A locale may also include a database of messages for various system commands.
Locales may be classified according to the types of data they store. For example, in some Unix systems, locales can be grouped into six categories of related fields. An LC.sub.-- CTYPE category of fields includes information about characters used by a locale, such as which characters are uppercase, which are printable, etcetera. An LC.sub.-- NUMERIC category of fields includes information regarding non-monetary numeric values, such as whether to use a comma or a period as the decimal point. An LC.sub.-- TIME category of fields includes names for months, days of the week and information for formatting dates and time. An LC.sub.-- COLLATE category of fields includes information for sorting strings in the locale. An LC.sub.-- MONETARY category of fields includes information for formatting monetary values, including monetary symbols and whether the symbol precedes or follows the value. An LC.sub.-- MESSAGES category of fields includes strings to use for the messages displayed by various commands of the computer system.
The syntax for locale specifications allows the user to choose each category from a different locale (e.g. /es/es/es/es/es/fr, which would use Spanish/Spain for everything except the messages, which are to be French/France). Most people generally use the simple form, which consists of one name for all of the fields (e.g. "es" for Spanish/Spain).
In other Unix systems, and in other systems besides Unix systems, locales may be classified in other ways and may store any of a variety of types of language specific and location specific formatting data.
Typically, locales are maintained independent of any application programs running on a computer system. Locales may, for example, be maintained as part of an operating system. Alternatively, locales may be maintained separate from an operating system, for example, as a separate program or application which runs cooperatively with an operating system.
Presently available systems for formatting outputs from a computer system can be divided into two types. The first type employs a database of locales. Each locale in the database is encoded for a particular language and geographic location combination. The user may select a locale from a list of supported locales.
For example, a user may select a United States locale from a list of available locales. Such a locale will typically permit the computer to provide output in English or American English and will employ standard U.S. numerical and date formatting. Alternatively, a user may select a Germany locale from a list of available locales. In that case, the computer system will provide displays in a German language and will employ standard German or European number and date formatting. Such systems are simple to use because they require little input from the user.
This first type of system, however, is inflexible because not all possible language and locations are supported by default locales. Thus, a user cannot select a language and location combination unless it is supported by an existing locale. For example, a person from the U.S. who is visiting Germany may wish to employ a locale providing words in American English but currency symbols and date and time formats in the format of the host country. Without a supporting locale, however, the user must choose between a locale which lacks the desired language and a locale which lacks the desired monetary and number formatting.
The second type of system for formatting computer outputs permits users to edit individual fields which make up a locale. However, because a locale may include thirty fields or more, editing a locale in this second type of system is arduous.
What is needed, therefore, is a system and method for providing a user with a choice of languages and a choice of geographic locations and for generating new composite locales whenever a selected language and location combination is not supported by an existing, or default, locale.